﻿using System;
using System.Security.Cryptography;
using System.Text;

namespace Web.Infrastructure.Mvc.MvcCaptcha
{
    public static class StringForHashExtensions
    {
        public static string Hash(this string input)
        {
            return BitConverter.ToString(HashAlgorithm.Create("SHA1").ComputeHash(Encoding.UTF8.GetBytes(input))).Replace("-", "");
        }
    }
}